package com.util;

/**
 * Created by guing_guo on 2015/10/27.
 */
public class Config {
    /**
     * 当前线程中，查看老师还是学生的信息，0表示学生，1表示老师，线程结束后（注销），需要手动remove。
     * 登录后根据管理员的选择，调用set方法给type赋值。
     */
    private static ThreadLocal<Integer> type = new ThreadLocal<Integer>();
    /**
     * 登陆的类型，0表示学生，1表示老师，线程结束后（注销），需要手动remove。
     * 登录后根据管理员的选择，调用set方法给type赋值。
     */
    private static ThreadLocal<Integer> loginType = new ThreadLocal<Integer>();

    //管理员账号密码
    public static final String ROOT="root";
    public static final String PASSWORD="123";

    public static final String TEAC_LIST[] = {"工号", "姓名" , "年龄", "性别", "生日", "居住地", "政治面貌", "学院", "专业", "工龄", "职位"};
    public static final String STU_LIST[] = {"学号", "姓名", "年龄", "性别", "生日", "居住地","政治面貌", "学院", "专业（班级）"};
    public static final String DAY_LIST[] = {"", "一", "二", "三", "四", "五", "六", "日"};
    public static final String CLASS_LIST[] = {"1~2", "3~4","5~6","7~8","9~10","11~13"};
    public static final String DAY1_LIST[] = { "一", "二", "三", "四", "五", "六", "日"};

    public static int getType() {
        return type.get();
    }

    public static void setType(int _type) {
        type.set(_type);
    }

    public  static void removeType(){
        type.remove();
    }

    public static int getLoginType() {
        return loginType.get();
    }

    public static void setLoginType(int _type) {
        loginType.set(_type);
    }

    public  static void removeLoginType (){
        loginType .remove();
    }
}
